change query by selecting the column value